﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>CheckBoxList</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" /><link href="../demo.css" rel="stylesheet" type="text/css" />

    
    <script src="../../scripts/boot.js" type="text/javascript"></script>
    
       

</head>
<body>
    <h1>CheckBoxList 复选框组</h1>      
    
    <div id="cbl1" class="mini-checkboxlist" repeatItems="3" repeatLayout="table"
        textField="text" valueField="id" value="cn,usa" 
        url="../data/countrys.txt" >
    </div>

    <input type="button" value="setValue" onclick="setValue()"/>
    <input type="button" value="getValue" onclick="getValue()"/>    
    <input type="button" value="disable" onclick="disable()"/>
    <input type="button" value="enable" onclick="enable()"/>

    <script type="text/javascript">
        function setValue() {
            var obj = mini.get("cbl1");
            obj.setValue("usa");
            
        }
        function getValue() {
            var obj = mini.get("cbl1");
            alert(obj.getValue());
        }
        function enable() {
            var obj = mini.get("cbl1");
            obj.enable();
        }
        function disable() {
            var obj = mini.get("cbl1");
            obj.disable();
        }
    </script>

    <div class="description">
        <h3>Description</h3>
        <p>CheckBoxList用于对多个选择项进行多选操作。
        </p>
        <p>repeatItems、repeatLayout、repeatDirection等属性用于控制多个选择项的排布方式。</p>
    </div>
</body>
</html>